package com.siashan.unipay4j.core.exception;


import lombok.extern.slf4j.Slf4j;

/**
 * 不允许的操作异常.
 *
 * @author siashan
 * @since v1.0.1
 */
@Slf4j
public class Unipay4jOperationNotSupportedException extends RuntimeException {

    /**
     * 异常码
     */
    protected int code;

    private static final long serialVersionUID = 3160241586346324994L;

    public Unipay4jOperationNotSupportedException() {
    }

    public Unipay4jOperationNotSupportedException(Throwable cause) {
        super(cause);
    }

    public Unipay4jOperationNotSupportedException(String message) {
        super(message);
    }

    public Unipay4jOperationNotSupportedException(String message, Throwable cause) {
        super(message, cause);
    }

    public Unipay4jOperationNotSupportedException(int code, String message) {
        super(message);
        this.code = code;
    }

    public Unipay4jOperationNotSupportedException(int code, String msgFormat, Object... args) {
        super(String.format(msgFormat, args));
        this.code = code;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
